<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>文档标题</title>
    <script>
      function isRunNian(year) {
        if (year % 100 === 0) {
          return year % 400 === 0
        } else {
          return year % 4 === 0
        }
      }

      const month = Number(prompt("请输入月份"));
      switch (month) {
        case 1:
        case 3:
        case 5:
        case 7:
        case 8:
        case 10:
        case 12:
          alert(`当月有31天`);
          break;
        case 2:
          const year = Number(prompt("请输入年份"));
          if (isRunNian(year)) {
            alert(`当月有29天`);
          } else {
            alert(`当月有28天`);
          }
          break;
        case 4:
        case 6:
        case 9:
        case 11:
          alert(`当月有30天`);
          break;
      }
    </script>
</head>
<body>
<h1>我的第一个HTML页面</h1>
<p>我的第一个段落。</p>
</body>
</html>
